package org.adream.account.dao;

import java.util.List;

import org.adream.account.entity.GradeEntity;
import org.apache.ibatis.annotations.Param;

@BaseMybatisDao
public interface GradeDao {
	
	int addGrade(GradeEntity grade);
	
	int deleteGrade(GradeEntity grade);
	
	int updateGrade(GradeEntity grade);
	
	List<GradeEntity> queryGradesByDr(@Param("dr") Integer dr);
	
	GradeEntity queryGradeByGid(@Param("gid") Integer gid);
	
	GradeEntity queryGradeByGidAndDr(@Param("gid") Integer gid,@Param("dr") Integer dr);

	List<GradeEntity> queryGradesByPidAndDr(@Param("pid") Integer pid,@Param("dr") Integer dr);
	
	List<GradeEntity> queryGradesBySomeFields(@Param("dr") Integer dr,@Param("pid") Integer pid,@Param("gname") String gname);
	
	GradeEntity queryGradeByGname(@Param("gname") String gname);
}